package com.xcy.example.provider;

import com.xcy.example.common.service.UserService;
import com.xcy.xcyrpc.RpcApplication;
import com.xcy.xcyrpc.registry.LocalRegistry;
import com.xcy.xcyrpc.server.HttpServer;
import com.xcy.xcyrpc.server.VertxHttpServer;

public class ProviderExample {

        public static void main(String[] args) {
            // RPC 框架初始化
            RpcApplication.init();

            // 注册服务
            LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);

            // 启动 web 服务
            HttpServer httpServer = new VertxHttpServer();
            httpServer.doStart(RpcApplication.getRpcConfig().getServerPort());
        }

}
